package com.diandian.backend.douyin.life.exchange.controller;

import com.diandian.backend.douyin.life.exchange.service.DouyinLifeTokenBusinessService;
import com.diandian.base.boot.starter.response.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/token")
public class DouyinLifeTokenController {

    @Autowired
    private DouyinLifeTokenBusinessService tokenBusinessService;

    @GetMapping("/get")
    public BaseResult getToken(@RequestHeader(value = "clientKey") String clientKey,
                               @RequestHeader(value = "clientSecret") String clientSecret) {
        return new BaseResult(0, "success", tokenBusinessService.getToken(clientKey, clientSecret));
    }

}
